import yaml_handle
import os

class LogConfig():
    def __init__(self):
        yaml_file = yaml_handle.get_yaml_file()
        self.cfg = yaml_handle.read_yaml(yaml_file).get("Log")

    def get_log_path(self):
        return os.path.join(yaml_handle.BASE_PATH, self.cfg.get("path"))

    def get_log_fmt(self):
        return self.cfg.get("format")

    def get_log_datefmt(self):
        return self.cfg.get("datefmt")

    def get_log_level(self):
        return self.cfg.get("level")
